package de.gora.prog2swing.adventskalender;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenuItem;
import javax.swing.JOptionPane;

public class AdventMenuAdapter implements ActionListener {

	public void actionPerformed(ActionEvent event) {
		JMenuItem menuItem = (JMenuItem) event.getSource();
		
		switch(menuItem.getText()){
			case "Beenden":
				System.exit(0);
			break;
			
			case "Autor":
				JOptionPane.showMessageDialog(menuItem, "Author: Marco Gora\nRevison: xx\nRelease Date: xx-xx-xxxx", "AdventCalendar - Information", JOptionPane.INFORMATION_MESSAGE);
			break;
			
			case "Hilfe":
				JOptionPane.showMessageDialog(menuItem, "", "AdventCalendar - Help", JOptionPane.QUESTION_MESSAGE);
			break;	
		}
	}

}
